+2007-01-01 Matthias Clasen <mclasen@redhat.com>
+
+ Fix some IPP compliance issues. (#391523, Albrecht Dress)
+
+ * modules/printbackends/cups/gtkcupsutils.c
+ (gtk_cups_request_encode_option): Use IPP_TAG_JOB, not
+ IPP_TAG_OPERATION.
+ * modules/printbackends/cups/gtkprintbackendcups.c
+ (gtk_print_backend_cups_print_stream): Don't add the
+ requesting-user-name attribute a second time.
+
2007-01-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimcontextsimple.c: Fix en/em dash confusion. (#378462)
}
}
+/*
+ * Note that this function uses IPP_TAG_JOB, so it is
+ * only suitable for IPP Group 2 attributes.
+ * See RFC 2911.
+ */
void
gtk_cups_request_encode_option (GtkCupsRequest *request,
const gchar *option,
- const gchar *value)
+ const gchar *value)
{
ipp_tag_t option_tag;
case IPP_TAG_INTEGER:
case IPP_TAG_ENUM:
ippAddInteger (request->ipp_request,
- IPP_TAG_OPERATION,
+ IPP_TAG_JOB,
option_tag,
option,
strtol (value, NULL, 0));
b = 1;
ippAddBoolean(request->ipp_request,
- IPP_TAG_OPERATION,
+ IPP_TAG_JOB,
option,
b);
upper = lower;
ippAddRange (request->ipp_request,
- IPP_TAG_OPERATION,
+ IPP_TAG_JOB,
option,
lower,
upper);
units = IPP_RES_PER_INCH;
ippAddResolution (request->ipp_request,
- IPP_TAG_OPERATION,
+ IPP_TAG_JOB,
option,
units,
xres,
{
/* single value */
ippAddString (request->ipp_request,
- IPP_TAG_OPERATION,
+ IPP_TAG_JOB,
option_tag,
option,
NULL,
g_ptr_array_add (strings, next);
ippAddStrings (request->ipp_request,
- IPP_TAG_OPERATION,
+ IPP_TAG_JOB,
option_tag,
option,
strings->len,
gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, cups_printer->printer_uri);
- gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
- NULL, cupsUser());
-
title = gtk_print_job_get_title (job);
if (title)
gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,